package com.itheima.health.controller;


import com.alibaba.dubbo.config.annotation.Reference;
import com.itheima.health.entity.Result;
import com.itheima.health.pojo.Menu;
import com.itheima.health.service.DynamicPresentService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RequestMapping("/DynamicPresent")
@RestController
public class DynamicPresentController {
    @Reference
    private DynamicPresentService dynamicPresentService;
    @RequestMapping("/dynamic")
    public Result dynamic(String loginUsername){
        List<Menu> menuList=dynamicPresentService.dynamic(loginUsername);
        return new Result(true,"菜单显示成功",menuList);
    }
}
